package com.gqb.executor;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

public class ExecutorTry {
	public static void main(String[] args) {
		/*Executor executor=Executors.newFixedThreadPool(10);
		for (int i = 0; i < 20; i++) {
			final int j=i;
			Runnable taskRunnable=new Runnable() {
				
				@Override
				public void run() {
					try {
						Thread.sleep(500);
						System.out.println(j);
					} catch (InterruptedException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
				}
			};
			executor.execute(taskRunnable);
		}*/
		String a=new String("gqb");
		String b=new String("gqb");
		System.out.println(System.identityHashCode(a));
		System.out.println(System.identityHashCode(b));
		
		System.out.println(a.hashCode());
		System.out.println(b.hashCode());
		
		String c="dyq";
		String d="dyq";
		System.out.println(System.identityHashCode(c));
		System.out.println(System.identityHashCode(d));
		
		System.out.println(c.hashCode());
		System.out.println(d.hashCode());
		
		
	}
}
